
--[[

	通用常量

--]]

local Constant = class("Constant")

function Constant:ctor()

    self:register()
end

--热更会自动调用
function Constant:register()
    --登录类型

    self.gw_account = "gw_account"
    self.gw_token = "gw_token"

    self.CELL_H=8
    self.CELL_W=8

    self.isFirstTic=true
    self.isSfxOn=true
    self.state=0

    self.MENU_SCR="Menu"
    self.GAME_SCR="Game"
    self.PAUSE_SCR="Pause"
    self.OVER_SCR="GameOver"

    self.MENU_SFX="MenuSfx"
    self.SEL_MENU_SFX="SelectionMenuSfx"
    self.GAME_OVER_SFX="GameOverSfx"
    self.FELL_SFX="FellSfx"
    self.LINE_SFX="LineSfx"

    self.EMPTY_CELL_SPR=1
    self.DIE1_CELL_SPR=17
    self.DIE2_CELL_SPR=16

    self.DARKBLUE_CELL_SPR=3
    self.GREEN_CELL_SPR=4
    self.YELLOW_CELL_SPR=5
    self.RED_CELL_SPR=6
    self.BLUE_CELL_SPR=7
    self.BROWN_CELL_SPR=8
    self.LIGHTBLUE_CELL_SPR=9

    self.bestScore=0
    self.playerScore=0
    self.screenMng = nil
    self.gameScreen = nil
    self.soundMng = nil

    self.saveSfxOnIdx=0
    self.saveScoreIdx=1

end


-- Helpers --
function Constant:PrintToCell(text,cx,cy,color)
    print(text,CELL_W*cx,CELL_H*cy+2,color)
end

function Constant:DrawToCell(sprId,cx,cy)
    spr(sprId,CELL_W*cx,CELL_H*cy)
end

-- temporary placeholder
function Constant:sfx()
end








return Constant